package com.codi.jobservice.job;

import com.codi.base.spring.SpringContextHolder;
import com.codi.bus.core.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 查询机构的审核状态
 *
 * @author shi.pengyan
 * @version 1.0 2017-10-17 17:39
 * @since 1.0
 */
@Slf4j
@DisallowConcurrentExecution
public class QueryOrgStateJob extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        UserService userService = SpringContextHolder.getBean("userService");
        userService.checkOrgAcctStateAndSMS();
    }
}
